﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace RCREEE.Library.Entities
{
    public class StrategicObjectives
    {

        #region Private Variable

        private int _itemId;
        private string _itemName;
        private int _countryId;
        private int _untitId;
        private bool _isRE;
        private bool _isEE;
        private List<StrategicObjectivesItemValue> _itemValues;

        #endregion

        #region Public Properties

        public int ItemId
        {
            get { return _itemId; }
            set { _itemId = value; }
        }

        public string ItemName
        {
            get { return _itemName; }
            set { _itemName = value; }
        }

        public int CountryId
        {
            get { return _countryId; }
            set { _countryId = value; }
        }

        public int UnitId
        {
            get { return _untitId; }
            set { _untitId = value; }
        }

        public bool IsRE
        {
            get { return _isRE; }
            set { _isRE = value; }
        }

        public bool IsEE
        {
            get { return _isEE; }
            set { _isEE = value; }
        }

        public List<StrategicObjectivesItemValue> ItemValues
        {
            get { return _itemValues; }
            set { _itemValues = value; }
        }

        #endregion

        #region Constructor

        public StrategicObjectives()
        {
            ItemValues = new List<StrategicObjectivesItemValue>();
        }

        #endregion

        #region private Methods

        #endregion

        #region Public Methods

        public DataSet GetAllStrategicObjectivesItemValues(int _LanguageCode, int _CountryId)
        {
            return DataManager.GetAllStrategicObjectivesItemValues(_LanguageCode, _CountryId);
        }

        public StrategicObjectives GetOneStrategicObjectiveItemValuesById(int _ItemId, int _CountryId)
        {
            return DataManager.GetOneStrategicObjectiveItemValuesById(_ItemId, _CountryId);
        }

        public bool UpdateStrategicObjectiveItemValues()
        {
            return DataManager.UpdateStrategicObjectiveItemValues(this);
        }

        #endregion

        #region Override
        public override string ToString()
        {
            return ItemName;
        }
        #endregion

    }

    public struct StrategicObjectivesItemValue
    {
        public int Year { get; set; }

        public float Value { get; set; }
    }
}
